package pacificlms.Verifiable;

import java.lang.annotation.Annotation;
import java.lang.reflect.*;


import java.lang.annotation.Documented; 
import java.lang.annotation.ElementType; 
import java.lang.annotation.Retention; 
import java.lang.annotation.RetentionPolicy; 
import java.lang.annotation.Target;

/**
 * The VerifyAnnotation is used to assign database, and display related information to the methods used to get/set that information
 * @author Brian Hume
 */
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface VerifyAnnotation
{
    //////////////////////////////////////////////////////////////
    // required                                                 //
    //////////////////////////////////////////////////////////////
    /** this is the label given to the field that the user sees */
    public String ApplicationName();
    /** this is the name of the field in the database */
    public String DBName();
    /** this is the desired format of the field */
    public TypeEnum Type();
    /** this is the maximum length of the field */
    public int Length();
    
    //////////////////////////////////////////////////////////////
    // optional                                                 //
    //////////////////////////////////////////////////////////////
    /** this can set make Length the exact length instead of maximum */
    public boolean ExactLength() default false;
    /** this will allow null values */
    public boolean NotNull() default true;
    /** this will force the value to be used as an identifier in update statements */
    public boolean PrimaryKey() default false;
    /** this allows the user to change the value */
    public boolean Editable() default true;
    
    //////////////////////////////////////////////////////////////
    // lookup related                                           //
    //////////////////////////////////////////////////////////////
    /** This is the table this lookup refers to */
    public String LookupDBTable() default "";
    /** This is the field this lookup refers to */
    public String LookupDBField() default "";
    
    //////////////////////////////////////////////////////////////
    // enum related                                             //
    //////////////////////////////////////////////////////////////
    /** This is the list of enumerations that this field can take */
    public String[] EnumList() default {""};
}
